package com.jams.goodox.net.services;

import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.MoneyPayResultInfo;
import com.jams.goodox.entity.resp.AddTreatmentNameResp;
import com.jams.goodox.entity.resp.JobDetailResp;
import com.jams.goodox.entity.resp.JobListResp;
import com.jams.goodox.entity.resp.LinkManResp;
import com.jams.goodox.entity.resp.ResumeDetailResp;
import com.jams.goodox.entity.resp.ResumeListResp;
import com.jams.goodox.entity.resp.UserJobDetailResp;
import com.jams.goodox.entity.resp.UserJobListResp;
import com.jams.goodox.entity.resp.WelfareTagsResp;
import com.jams.goodox.net.BaseEntity;

import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by jams on 2017/6/1.
 * ***
 * Tel: ***
 */

public interface HeadHunterService {

    //获取企业端获取企业联系人信息
    @GET(UrlConstants.getLinkManInfo)
    Call<LinkManResp> getLinkManInfo(@Query("enterpriseId") String enterpriseId);

    //保存企业端联系人信息
    @FormUrlEncoded
    @POST(UrlConstants.saveLinkManInfo)
    Call<BaseEntity> saveLinkManInfo(@Field("linkmanInfo") String linkmanInfo);

    //获取企业的职位列表
    @GET(UrlConstants.getCompanyJobList)
    Call<JobListResp> getCompanyJobList(@Query("condition") String condition,@Query("enterpriseId") String enterpriseId,@Query("curPage") int curPage,@Query("pageSize") int pageSize);

    //获取企业职位详情
    @GET(UrlConstants.getCompanyJobDetail)
    Call<JobDetailResp> getCompanyJobDetail(@Query("positionId") String positionId);

    //发布企业职位
    @FormUrlEncoded
    @PUT(UrlConstants.saveCompanyJob)
    Call<BaseEntity> saveCompanyJob(@Field("positionInfo") String positionInfo);

    //删除职位
    @DELETE(UrlConstants.deleteJob)
    Call<BaseEntity> deleteCompanyJob(@Path("positionId") String positionId);

    //上下架职位
    @FormUrlEncoded
    @POST(UrlConstants.updateJobStatus)
    Call<BaseEntity> updateJob(@Field("positionId") String positionId,@Field("status") int status);

    //个人获取职位列表
    @GET(UrlConstants.getUserJobList)
    Call<UserJobListResp> getUserJobList(@Query("condition") String condition,@Query("curPage") int curPage,@Query("pageSize") int pageSize);

    //获取个人职位详情页
    @GET(UrlConstants.getUserJobDetail)
    Call<UserJobDetailResp> getUserJObDetail(@Path("positionId") String positionId);

    //获取简历列表
    @GET(UrlConstants.getResumeList)
    Call<ResumeListResp> getResumeList(@Query("condition") String condition,@Query("enterpriseId") String enterpriseId,@Query("curPage") int curPage,@Query("pageSize") int pageSize);

    //获取简历详情
    @GET(UrlConstants.getResumeDetail)
    Call<ResumeDetailResp> getResumeDetail(@Path("resumeId") String resumeId);

    //简历不匹配
    @GET(UrlConstants.disableResume)
    Call<BaseEntity> disableResume(@Path("orderId") String ordeId);

    //获取福利待遇
    @GET(UrlConstants.welfareTags)
    Call<WelfareTagsResp> getWelfareTags(@Path("enterpriseId") String enterpriseId);

    //增加福利标签
    @POST(UrlConstants.addWelfareTag)
    Call<AddTreatmentNameResp> addWelfareTag(@Path("enterpriseId") String enterpriseId, @Path("treatmentName") String treatmentName);

    //删除福利标签
    @DELETE(UrlConstants.delWelfareTag)
    Call<BaseEntity> delWelfareTag(@Path("treatmentId") String treatmentId);

    //支付
    @GET(UrlConstants.resumePay)
    Call<MoneyPayResultInfo> payReward(@Query("balance") String balance, @Query("adminId") String enterpriseId, @Query("orderId") String orderId, @Query("password") String password);
}

